Skip to main content

chartJSONOptions

Type

property

Summary

Gets or sets options for displaying the chart in JSON format

Syntax

set the chartJSONOptions of widget to <JSON string options>
get the chartJSONOptions of widget

Description

This property exposes the entire javascript object [chart.options] (https://www.chartjs.org/docs/3.7.0/general/options.html) to LCS, allowing experienced chartjs users to create advanced charts by setting this property to (JSON format).

Warning: Several properties will be affected by setting this property directly.

Examples

on mouseUp
local tJSONOptions

put "{'options':{'scales':{'y':{'beginAtZero':true}}}}" into tJSONOptions
replace "'" with quote in tJSONOptions
set the chartJSONOptions of widget "Chart View" to tJSONOptions
end mouseUp
on mouseUp
local tJSONOptions
put true into tJSONOptions["options"]["scales"]["y"]["beginAtZero"]
put ArrayToJSON(tJSONOptions) into tJSONOptions
set the chartJSONOptions of widget "Chart View" to tJSONOptions
end mouseUp

Compatibility and Support

OS

mac

windows

linux

ios

android

web